package com.baizhi.Api;

import com.baizhi.entity.Banner;
import com.baizhi.service.BannerService;
import com.baizhi.service.GuruService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/cmfz")
public class TestApi {
    @Autowired(required = false)
    private BannerService bannerService;
    @Autowired(required = false)
    private GuruService guruService;


    @GetMapping("testGet/{name},{password}")
    public String login(@PathVariable("name") String name,@PathVariable("password") String password){
        return "用户名为:"+name+"密码为:"+password;

    }

    @GetMapping("selectAll/{page},{limit},{bannerOldName}")
    public Map selectAll(@PathVariable("page") int page, @PathVariable("limit") int limit,@PathVariable("bannerOldName") String bannerOldName){
        return bannerService.selectAll(page,limit,"");

    }


}
